package com.qf.interfacedemo;

public class FlyUtils {

    // 训练飞行员 , 参数多态
    public static void trainFlier(Flyable flyable){
        for (int i = 0; i < 10; i++) {
            flyable.fly();
        }
    }

    public static void main(String[] args) {
        Cat cat = new Cat();
        trainFlier(cat);

        Dog dog = new Dog();
        trainFlier(dog);
    }

}
